package com.hy.${packageCode}.common.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.hy.${packageCode}.common.api.vo.NamedVO;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;

@Getter
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor(onConstructor_ = {@JsonCreator})
public class NamedDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    private Long id;
    private String name;

    public NamedVO to() {
        return new NamedVO(id, name);
    }
}
